﻿<navigation:Page x:Class="DanielVaughan.Calcium.Gui.SLShellView"
        x:Name="page_Root"
		xmlns:Controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"   
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="d"
        xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
        xmlns:Local="clr-namespace:DanielVaughan.Calcium.Gui.Controls"
        xmlns:Client="clr-namespace:DanielVaughan.Calcium"
        xmlns:expressionDark="clr-namespace:System.Windows.Controls.Theming;assembly=System.Windows.Controls.Theming.ExpressionDark"
        xmlns:controls="clr-namespace:System.Windows.Controls.Theming;assembly=System.Windows.Controls.Theming.Toolkit" 
        xmlns:Regions="clr-namespace:Microsoft.Practices.Prism.Regions;assembly=Microsoft.Practices.Prism" 
                 
		d:DesignWidth="640" d:DesignHeight="480"
        Title="Calcium" SizeChanged="page_Root_SizeChanged">
	<navigation:Page.Resources>
		<Client:RegionNames x:Key="RegionNames" />
		<Client:MenuNames x:Key="MenuNames" />
		<Storyboard x:Name="CloseLeft"><DoubleAnimation Storyboard.TargetName="page_Root" Storyboard.TargetProperty="LeftColumnWidth"
                             To="0.0" Duration="00:00:00.3" x:Name="animCloseCol" /></Storyboard>
		<Storyboard x:Name="OpenLeft"><DoubleAnimation Storyboard.TargetName="page_Root" Storyboard.TargetProperty="LeftColumnWidth"
                             From="0" To="200" Duration="00:00:00.3" /></Storyboard>
		<Storyboard x:Name="CloseBottom"><DoubleAnimation Storyboard.TargetName="page_Root" Storyboard.TargetProperty="RowHeight"
                             To="0.0" Duration="00:00:00.3" x:Name="animCloseRow" /></Storyboard>
		<Storyboard x:Name="OpenBottom"><DoubleAnimation Storyboard.TargetName="page_Root" Storyboard.TargetProperty="RowHeight"
                             From="0" To="150" Duration="00:00:00.3" /></Storyboard>
		<Storyboard x:Name="CloseRight"><DoubleAnimation Storyboard.TargetName="page_Root" Storyboard.TargetProperty="RightColumnWidth"
                             To="0.0" Duration="00:00:00.3" x:Name="animCloseCol2" /></Storyboard>
		<Storyboard x:Name="OpenRight"><DoubleAnimation Storyboard.TargetName="page_Root" Storyboard.TargetProperty="RightColumnWidth"
                             From="0" To="200" Duration="00:00:00.3" /></Storyboard>
		
	</navigation:Page.Resources>
	<Grid x:Name="LayoutRoot">	
        <!-- TODO: Resolve issue with theme breaking UI. -->
		<!--<expressionDark:ExpressionDarkTheme>-->	
			<Grid x:Name="grid_ThemeRoot" controls:ImplicitStyleManager.ApplyMode="Auto" Background="Transparent">
				<Grid.RowDefinitions>
					<RowDefinition Height="Auto" />
					<RowDefinition Height="Auto"/> <!-- 50 -->
					<RowDefinition Height="Auto"/> <!-- 50 -->
					<RowDefinition Height="*"/>
				</Grid.RowDefinitions>
				
				<StackPanel Orientation="Horizontal" Grid.Row="0" Regions:RegionManager.RegionName="{Binding BannerName, Source={StaticResource RegionNames}}"/>
				
				<!-- Main Menu -->
				<StackPanel x:Name="StackPanel_MainMenu"
							Regions:RegionManager.RegionName="{Binding MainMenuName, Source={StaticResource MenuNames}}"
							Orientation="Horizontal"
							Grid.Row="1">
					<StackPanel x:Name="StackPanel_FileMenu"
								Regions:RegionManager.RegionName="{Binding FileName, Source={StaticResource MenuNames}}"
								Orientation="Horizontal">
						<StackPanel x:Name="StackPanel_FileOpenMenu"
									Regions:RegionManager.RegionName="{Binding FileOpenName, Source={StaticResource MenuNames}}"
									Orientation="Horizontal" />
					</StackPanel>
					<StackPanel x:Name="StackPanel_ViewMenu"
								Regions:RegionManager.RegionName="{Binding ViewName, Source={StaticResource MenuNames}}"
								Orientation="Horizontal" />
				</StackPanel>
				
				<!-- Standard Toolbar -->
				<StackPanel x:Name="StackPanel_StandardToolBarTray" 
							Regions:RegionManager.RegionName="{Binding StandardToolBarTrayName, Source={StaticResource RegionNames}}" 
							Orientation="Horizontal" Grid.Row="2" />
				
				<!--<Border x:Name="border_Banner" Grid.Row="1" Margin="10, 0, 0, 0">
						<Local:TitleBanner x:Name="titleBanner" HorizontalAlignment="Stretch" Padding="0, 0, 10, 5" Margin="0"/>
				</Border>-->
				<!--<ContentControl x:Name="contentControl_Menu" Grid.Row="2" 
								Margin="0,0,10,5" Padding="5">
					<StackPanel>
						<Local:StandardMenu Margin="10, 0, 0, 0"/>
						<Local:StandardToolBarTray Margin="7, 5, 0, 0" Height="31"/>						
					</StackPanel>
				</ContentControl>-->	
				<Grid x:Name="grid_Inner" Grid.Row="3">
					<Grid.RowDefinitions>
						<RowDefinition />
					</Grid.RowDefinitions>
					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="200" x:Name="columnDefinition_Left" />
						<ColumnDefinition Width="Auto"/>
						<ColumnDefinition Width="*" />
						<ColumnDefinition Width="Auto" />
						<ColumnDefinition Width="200" x:Name="columnDefinition_Right" />
					</Grid.ColumnDefinitions>

					<Grid x:Name="grid_Left" SizeChanged="Grid_Left_SizeChanged">
						<Controls:TabControl x:Name="tabControl_Left" 
							Regions:RegionManager.RegionName="{Binding ToolsName, Source={StaticResource RegionNames}}"
							SelectionChanged="OnTabControl_Left_SelectionChanged"
							MinWidth="0"
		   					HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
        					BorderThickness="0,0,0,0" Margin="0,0,1,0"/>
					</Grid>

					<Grid Grid.Column="2" >
						<Grid.RowDefinitions>
							<RowDefinition />
							<RowDefinition Height="Auto" />
							<RowDefinition x:Name="rowDefinition_Bottom" Height="150" />
						</Grid.RowDefinitions>

						<Grid>
							<Controls:TabControl x:Name="tabControl_Workspace"
										Regions:RegionManager.RegionName="{Binding WorkspaceName, Source={StaticResource RegionNames}}"
										Width="Auto" Height="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="1,0,1,0"
										SelectionChanged="workspaceTabCorntrol_SelectionChanged" />
						</Grid>

						<Local:ExpandableGridSplitter x:Name="gridSplitter_Bottom" ShowsPreview="True" Grid.Row="1" Height="7"
										HorizontalAlignment="Stretch" VerticalAlignment="Center"
										CollapseButtonClickEvent="GridSplitter_Center_ButtonClick"
										Background="{Binding Background, ElementName=grid_ThemeRoot, Mode=OneWay}"/>

						<Grid x:Name="grid_Bottom" Grid.Row="2" SizeChanged="Grid_Bottom_SizeChanged" >
							<Controls:TabControl x:Name="tabControl_Bottom" 
										Regions:RegionManager.RegionName="{Binding FooterName, Source={StaticResource RegionNames}}"
										SelectionChanged="OnTabControl_Bottom_SelectionChanged"
										MinHeight="80" 
										HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
										Margin="0,1,0,10" >
								<!--<Controls:TabControl.ItemTemplate>
									<DataTemplate>
										<Grid><TextBlock>Ahoj</TextBlock></Grid>
									</DataTemplate>
								</Controls:TabControl.ItemTemplate>-->
							</Controls:TabControl>
						</Grid>


					</Grid>

					<Local:ExpandableGridSplitter x:Name="gridSplitter_Left" ShowsPreview="True" Grid.Column="1" Width="7"													 
												HorizontalAlignment="Center" VerticalAlignment="Stretch"
												CollapseButtonClickEvent="gridSplitter_Left_ButtonClick" 
												Background="{Binding Background, ElementName=grid_ThemeRoot, Mode=OneWay}"/>

					<Local:ExpandableGridSplitter x:Name="gridSplitter_Right" ShowsPreview="True" Grid.Column="3" Width="7"
												HorizontalAlignment="Center" VerticalAlignment="Stretch"
												CollapseButtonClickEvent="gridSplitter_Right_ButtonClick"
												Background="{Binding Background, ElementName=grid_ThemeRoot, Mode=OneWay}"/>

					<Grid x:Name="grid_Right" SizeChanged="Grid_Right_SizeChanged" Grid.Column="4" >
						<Controls:TabControl x:Name="tabControl_Right" 
									Regions:RegionManager.RegionName="{Binding PropertiesName, Source={StaticResource RegionNames}}"	
									SelectionChanged="OnTabControl_Right_SelectionChanged"
			 						MinWidth="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
									BorderThickness="0,0,0,0" Margin="1,0,0,0" />
					</Grid>
				</Grid>
			
				<!--<rbn:Ribbon x:Name="RibbonCtrl" Grid.Row="0" OfficeButtonImageSource="../../Resources/Images/OfficeLogo.png"
							Regions:RegionManager.RegionName="Ribbon">
					<rbn:Ribbon.QuickLaunchButtons>
						<rbn:RibbonButton SmallImageSource="../../Resources/Images/Save.png" />
						<rbn:RibbonButton SmallImageSource="../../Resources/Images/Undo.png" MenuID="MenuUndo" />
						<rbn:RibbonButton SmallImageSource="../../Resources/Images/Repeat.png" />
					</rbn:Ribbon.QuickLaunchButtons>

					<rbn:RibbonTab Title="Home" Regions:RegionManager.RegionName="Ribbon_Home">
						<rbn:RibbonTabGroup Title="Clipboard" Dialog="Enabled">
							<rbn:RibbonButton Text="Paste" LargeImageSource="Images/PasteLarge.png" ToolTipID="ToolTipPaste"
                                      MenuID="MenuPaste"  />
							<rbn:RibbonButton Format="SmallWithText" Text="Cut" SmallImageSource="Images/Cut.png" ToolTipID="ToolTipCut" />
							<rbn:RibbonButton Format="SmallWithText" Text="Copy" SmallImageSource="Images/Copy.png" ToolTipID="ToolTipCopy"  /> 
							<rbn:RibbonButton Format="SmallWithText" Text="Format Painter" SmallImageSource="Images/FormatPainter.png" ToolTipID="ToolTipFormatPainter" />
						</rbn:RibbonTabGroup>
					</rbn:RibbonTab>
				</rbn:Ribbon>-->
			</Grid>
		<!--</expressionDark:ExpressionDarkTheme>-->
	</Grid>
</navigation:Page>
